import 'package:flutter/material.dart';

class Login extends StatelessWidget {
  @override
  Widget build(BuildContext context) {
    return Scaffold(
      appBar: AppBar(title: Text('登录')),
      body: Column(
        children: [
          TextField(
            decoration: InputDecoration(hintText: '请输入账号'),
          ),
          TextButton(onPressed: () {
            // 跳转到注册界面
            // 弹出当前栈元素,并将下一个入栈
            // Navigator.pushReplacementNamed(context, '/register');
            Navigator.pushNamed(context, '/register');
          }, child: Text('注册'))
        ],
      ),
    );
  }
}
